package com.itheima.service.impl;

import com.itheima.dao.BookDao;
import com.itheima.domain.Book;
import com.itheima.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * className: BookServiceImpl
 * description:
 * date: 2023/3/5 0005-PM 4:45:45
 * <p>
 * project: springboot
 * package: com.itheima.service.impl
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookDao bookDao;

    /**
     * 保存
     *
     * @param book {@link Book}
     * @return {@link Boolean}
     */
    @Override
    public boolean save(Book book) {
        return bookDao.insert(book) > 0;
    }
}
